package com.xbongbong.saas.script.modifyenum;

import com.xbongbong.saas.enums.business.ContractEnum;
import lombok.Getter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 流程表单合同处理，新增了两个字段
 * @author chenshan
 * @version v1.0
 * @since 2019-12-12 15:32
 */
@Getter
public enum ScriptContractFlowExplainsEnum {
    ADD_WRITE_OFF_PREPAYMENT(ContractEnum.ADD_WRITE_OFF_PREPAYMENT.getAttr(), "",ContractEnum.ADD_WRITE_OFF_PREPAYMENT.getFieldType(),0,1,0),
    ADD_PAYMENT_SHEET(ContractEnum.ADD_PAYMENT_SHEET.getAttr(), "",ContractEnum.ADD_PAYMENT_SHEET.getFieldType(),0,1,0),
    ;
    
    /**
     * 字段
     */
    private String attr;
    
    /**
     * 子表单内部字段
     */
    private String subAttr;
    
    /**
     * 字段类型
     */
    private Integer fieldType;
    
    /**
     * 是否可编辑 1：允许 0：不允许
     */
    private Integer editable;
    
    /**
     * 是否允许可见 1：允许 0：不允许
     */
    private Integer visible;
    
    /**
     * 是否开启简报 1 ：是 0 ：不是
     */
    private Integer summary;
    
    ScriptContractFlowExplainsEnum(String attr, String subAttr, Integer fieldType, Integer editable, Integer visible, Integer summary) {
        this.attr = attr;
        this.subAttr = subAttr;
        this.fieldType = fieldType;
        this.editable = editable;
        this.visible = visible;
        this.summary = summary;
    }
    /**
     *
     * @return
     */
    public static List<ScriptContractFlowExplainsEnum> getAllEnum() {
        List<ScriptContractFlowExplainsEnum> list = new ArrayList<>();
        Collections.addAll(list, values());
        return list;
    }
}
